package com.rx.mgt.controller;

import com.rx.mgt.domain.EmailUserLoginCounts;
import com.rx.mgt.service.EmailUserLoginCountsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by zxj on 2017/8/14.
 */
@Controller
public class EmailUserLoginCountsController {

    @Autowired
    private EmailUserLoginCountsService service;


    /**
     * 在线用户统计
     */
    @RequestMapping("/emailUserLgoinCounts.htmlx")
    public String queryEmailUserLoginCounts(HttpServletRequest request){

        List<EmailUserLoginCounts> list = service.queryEmailUserLoginCounts();

        request.setAttribute("list",list);


        return "chart/online_users";
    }

    /**
     * 系统信息
     */
    @RequestMapping("/system_propety.htmlx")
    public String querySysPropety(HttpServletRequest request){
       Map<String,Object> rs = new HashMap<String,Object>();
        rs = service.querySysPropety();
        request.setAttribute("rs",rs);
        return "sys_propety";
    }

    /**
     * 系统信息
     */
    @RequestMapping("/system_propety2.htmlx")
    public String system_propety2(HttpServletRequest request){
        Map<String,Object> rs = new HashMap<String,Object>();
        rs = service.querySysPropety();
        request.setAttribute("rs",rs);
        return "system_propety2";
    }
}
